package com.chinasofti.io;

import java.io.*;
import java.util.Arrays;

public class Demo13 {
    public static void main(String[] args) throws IOException {
        OutputStreamWriter osw =
                new OutputStreamWriter(new FileOutputStream("java0419\\aa.txt"),"GBK");
        osw.write("中国");
        osw.close();

        InputStreamReader isr =
                new InputStreamReader(new FileInputStream("java0419\\aa.txt"),"GBK");
        int ch ;
        while ((ch = isr.read())!= -1){
            System.out.println((char)ch);
        }
        isr.close();

    }
}